package com.hospital.demo.service.impl.jiashuai;

import com.hospital.demo.mapper.jiashuai.IDepatmentDao;
import com.hospital.demo.model.jiashuai.Department;
import com.hospital.demo.service.jiashuai.IDepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DepartmentServiceImpl implements IDepartmentService {
    @Autowired
    private IDepatmentDao iDepatmentDao;
    @Override
    public List<Department> selectDepartment() {
        return iDepatmentDao.selectDepartment();
    }

    @Override
    public int delDepartment(int id) {
        return iDepatmentDao.delete(id);
    }

    @Override
    public int addDepartment(Department department) {
        return iDepatmentDao.insert(department);
    }
}
